<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="author" content="甘忠祥">
    <title>百度新闻</title>
    <style>
        * {
            box-sizing: border-box;
        }

        ul {
            list-style: none;
        }

        .clear {
            clear: both;
        }

        header {
            width: 1500px;
            float: left;
        }

        header ul {
            float: right;
        }

        header ul li {
            float: left;
            padding: 0 10px;
        }

        header ul li a {
            color: black;
            text-decoration: none;
            font-weight: bold;
        }

        #sy {
            width: 400px;
            float: right;
        }

        #sy ul {
            float: right;
        }

        #sy ul li {
            float: left;
            padding: 0 10px;
        }

        .container {
            width: 1250px;
            margin: 0 auto;
            
        }
        table{
            margin-top: 20px;   
        }
        table ul{
            float: right;
        }
        table ul li{
            float: left;
            padding: 10px 10px;
        }
        nav{
            width: 100%;
            height: 43px;
            background-color: #01204f;
            text-align: center;
            z-index: 999;
            position: relative;
        }
        nav ul li{
            float: left;
            color: #fff;
            padding: 0 10px;
            line-height: 43px;
        }
        #container{
            width: calc(100% - 900px);
            margin: 0 auto;
        }
    </style>
</head>

<body>
    <div class="top">
        <header>
            <ul>
                <li><a href="https://www.baidu.com/">网页</a></li>
                <li><a href="http://news.baidu.com/">新闻</a></li>
                <li><a href="http://tieba.baidu.com/">贴吧</a></li>
                <li><a href="https://zhidao.baidu.com/">知道</a></li>
                <li><a href="http://music.baidu.com/">音乐</a></li>
                <li><a href="http://image.baidu.com/">图片</a></li>
                <li><a href="http://v.baidu.com/">视频</a></li>
                <li><a href="http://map.baidu.com/">地图</a></li>
                <li><a href="http://wenku.baidu.com/">文库&#x3000;|</a></li>
            </ul>
        </header>
        <div id="sy">
            <ul>
                <li><a href="https://www.baidu.com/"></a>百度首页&#x3000;|</li>
                <li>用户登录&#x3000;|</li>
                <li>百度新闻客户端</li>
            </ul>
        </div>
    </div>
    <div class="clear"></div>
    <hr>
    <div class="container">
        <table>
                <td>
                    <div class="logo">
                        <a href="http://news.baidu.com/view.html">
                           <img src="index.png"alt="百度新闻" height="60px" width="200px">
                        </a>
                    </div>
                </td>
                <td>
                <input type="text" style="height:40px; width:500px; margin-top:20px">
                <button style="height:40px;width:150px;border:none;background-color:#2932e1;border-radius:5px;">百度一下</button>
                <ul>
                    <li>帮助</li>
                    <li>高级设置</li>
                    <li>搜索</li>
                </ul>
        </table>
        <p>
        <input type="radio" name="tn" value="news" checked="checked" id="news">
        <label for="news" class="checked">新闻全文</label>
        <input type="radio" name="tn" value="newstitle" id="newstitle">
        <label for="newstitle" class="not-checked">新闻标题</label>
        </p>
    </div>
    <nav>
        <div id="container">
            <ul class="clearfix">
                <li id="one">首页</li>
                <li>百家号</li>
                <li>国内</li>
                <li>国际</li>
                <li>军事</li>
                <li>社会</li>
                <li>财经</li>
                <li>娱乐</li>
                <li>体育</li>
                <li>互联网</li>
                <li>科技</li>
                <li>游戏</li>
                <li>时尚</li>
                <li>女人</li>
                <li>汽车</li>
                <li>个性推荐</li>
                <li id="more">更多</li>
                <span class="more" class="clear">房产</span> 
            </ul>
            
        </div>
    </nav>
</body>
<script>
    var navLi = document.querySelectorAll('nav li');
    var moCo = document.querySelector('.more');
    var nav = document.querySelector('nav');
    for(var i=0;i<navLi.length;i++){
        navLi[i].index = i;
        navLi[i].onmouseover = function(){
            navLi[this.index].style.backgroundColor = '#c00';
            if(this.index == 16){
                moCo.style.display = 'block';
            }
        }
        navLi[i].onmouseleave = function(){
            navLi[this.index].style.cssText = 'none';
            if(this.index == 16){
                moCo.style.display = 'none';
            }
        }
        
    }
</script>
</html>